package com.zrf.dubbo.controller;

import com.zrf.dubbo.model.Customer;
import com.zrf.dubbo.service.CustomerRefService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.math.BigDecimal;

/**
 * @author zhouruifeng
 * @date 2018/5/21
 */
@RestController
@RequestMapping("customer")
public class CustomerController {
    @Resource
    private CustomerRefService customerRefService;

    @RequestMapping("id/{id}")
    public Customer findById(@PathVariable(name = "id") BigDecimal id) {
        return customerRefService.findById(id);
    }
}
